home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Libraries / SAT 2.3b4 / Demo ƒ / HeartQuest demo ƒ / SoundConst.p < prev    next >
Text File  |  1994-11-02  |  2KB  |  63 lines

  1. {=================================================}
  2. {============= Sound Constants and handles ==============}
  3. {=================================================}
  4.  
  5. { Example file for Ingemars Sprite Animation Toolkit. }
  6. { © Ingemar Ragnemalm 1992 }
  7. { See doc files for legal terms for using this code. }
  8.  
  9. { This file defines all the resource numbers for your sound resources, plus}
  10. { handles to each one. The procedure LoadSounds is called at startup. It calls}
  11. { the sound units for each sound to preload. Note that merely loading the sound}
  12. { is not enough if the sound units decide to use Sound Driver. }
  13.  
  14. { When designing your game, my advice to you is to use sounds, several sounds,}
  15. { but not ridiculously many and large. A simplistic game that takes 1000k on disk}
  16. { just because it contains lots of sounds is just a waste of disk (and we have seen}
  17. { far too many of them on the shareware market), but a well-polished, complex}
  18. { and interesting game can use more. }
  19.  
  20. unit SoundConst;
  21.  
  22. interface
  23.  
  24.     uses
  25. {$IFC UNDEFINED THINK_PASCAL}
  26.         Types,
  27. {$ENDC}
  28.         SAT;
  29.  
  30.     const
  31.         splatt2Snd = 14315;
  32.         splatt3Snd = 20039;
  33.         klounkSnd = 21999;
  34.         plinkSnd = 10873;
  35.         sadarSnd = 25626;
  36.         jaSnd = 3024;
  37.  
  38.  
  39.     var
  40.         splatt2SndH, splatt3SndH, klounkSndH: handle;
  41.         plinkSndH, sadarSndH, jaSndH, tickSndH, miuiuH, drringH: handle;
  42.  
  43.     procedure LoadSounds;
  44.  
  45. implementation
  46.  
  47.     procedure LoadSounds;
  48.     begin
  49.         splatt2SndH := SATGetSound(Splatt2Snd);
  50.         splatt3SndH := SATGetSound(Splatt3Snd);
  51.         klounkSndH := SATGetSound(KlounkSnd);
  52.         plinkSndH := SATGetSound(PlinkSnd);
  53.         sadarSndH := SATGetSound(SadarSnd);
  54.         jaSndH := SATGetSound(JaSnd);
  55.         tickSndH := SATGetNamedSound('tick');
  56.         miuiuH := SATGetNamedSound('Miuiu');
  57.         drringH := SATGetNamedSound('Drring');
  58. {Why I'm using SATGetSound most of the time but SATGetNamedSound for the last ones?}
  59. {Because I started using resource id's, but later decided that the names are the "right"}
  60. {way to get sounds! Use whatever way you like best.}
  61.     end;
  62.  
  63. end.